home *** CD-ROM | disk | FTP | other *** search
/ Varios Español / Varios Español.iso / DBASE5 / CUA_SAMP.ZIP / UPLOOK.PRG < prev    next >
Text File  |  1994-10-12  |  1KB  |  46 lines

  1. PROCEDURE UpLook
  2. PARAMETERS pcForm
  3. *----------------------------------------------------------------------------
  4. * NAME
  5. *   UpLook - Update the lookup fields after moving the record pointer.
  6. *
  7. * PARAMETERS
  8. *   pcForm     = Object reference to the active form.
  9. *
  10. *----------------------------------------------------------------------------
  11.     PRIVATE oF, oC
  12.  
  13.     *---------------------------------------
  14.     *-- Check for need to scan lookup fields
  15.     *---------------------------------------
  16.     IF TYPE( "pcForm.Scan4Look" ) = "N" .AND. pcForm.Scan4Look > 0
  17.  
  18.         *-----------------------------------------------------------
  19.         *-- For Each field that has a lookup, call LookRef to update
  20.         *-- the value of the look fields.
  21.         *-----------------------------------------------------------
  22.         oF = pcForm.First
  23.         oC = m->oF
  24.         DO WHILE .T.
  25.             IF oC.ClassName = "ENTRYFIELD"
  26.                 IF TYPE( "oC.LookTag" ) = "C"
  27.                     SELECT (oC.LookAlias)
  28.                     SEEK EVAL( oc.DataLink )
  29.                 ENDIF
  30.             ENDIF
  31.             oC = oC.After
  32.             IF oC = m->oF
  33.                 EXIT
  34.             ENDIF
  35.         ENDDO
  36.  
  37.     ENDIF
  38.  
  39.     IF TYPE( "pcForm.CurrMast" ) = "C"
  40.         SELECT ( pcForm.CurrMast )
  41.     ENDIF
  42. RETURN
  43. *-- EOP: UpLook WITH pcForm
  44.  
  45.  
  46.